<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        #box{
            width: 1000px;
            height: 300px;
            margin: 0 auto;
        }
        .wj{
            width: 650px;
            display: inline-block;
            vertical-align: top;
        }
        img{
            height: 100%;
            margin-right: 10px;
        }
        .price{
            color: red;
        }
        span{
            color: gray;
        }
        button{
            border: 0;
            height: 40px;
            width: 80px;
        }
        .re{
            border-top-left-radius: 10px; /* 左上角圆角 */
            border-bottom-left-radius: 10px; 
            background-color: red;
        }
        .ye{
            background-color: yellow;
            border-top-right-radius: 10px; /* 右上角圆角 */
            border-bottom-right-radius: 10px; 
        }
    </style>
</head>
<body>
    <div id="box">
        <!-- <img src="https://image3.suning.cn/uimg/b2c/newcatentries/0070089868-000000000624430611_1_800x800.jpg" alt="">
        <div class="wj">
            <h4>恐龙玩具模型变形恐龙蛋儿童仿真动物霸王龙翼龙三角龙模型玩具</h4>
            <p class="price">￥38.00</p>
            <p><span>配送：</span>山东济宁至武汉江岸</p>
            <p>快递: 免运费预计3小时内发货|承诺48小时内发货</p>
            <button class="re">立即购买</button><button class="ye">加入购物车</button>
        </div> -->
    </div>
</body>

</html>
<script src="./axios.js"></script>
<script>
    console.log(location.search.split("=")[1]);
    var id = location.search.split("=")[1];
    var oBox = document.querySelector("#box")
    axios({
        method: "get",
        url: "http://localhost:8888/goods/item",
        params: {
            id: id * 1
        }
    }).then(res => {
       console.log(res);
       var str =''
       str +=   `<img src="${res.data.info.img_big_logo}" alt="">
        <div class="wj">
            <h4>${res.data.info.title}</h4>
            <p class="price">￥${res.data.info.price}</p>
            <p><span>配送：</span>山东济宁至武汉江岸</p>
            <p>快递: 免运费预计3小时内发货|承诺48小时内发货</p>
            <button class="re">立即购买</button><button class="ye">加入购物车</button>
        </div>`
        oBox.innerHTML = str;
       
        
    })
</script>